import com.genexus.*;
import com.genexus.ui.*;

public final class subwmntvehser06 extends GXSubfileElement
{
   private byte VSel ;
   private short MVehCod ;
   private String MVehNroPla ;
   private String MVehNomPro ;
   private int CmbCod ;
   private byte TipAutCod ;
   private String ModCod ;
   private String MarCod ;
   public byte getVSel( )
   {
      return VSel ;
   }

   public void setVSel( byte value )
   {
      VSel = value;
   }

   public short getMVehCod( )
   {
      return MVehCod ;
   }

   public void setMVehCod( short value )
   {
      MVehCod = value;
   }

   public String getMVehNroPla( )
   {
      return MVehNroPla ;
   }

   public void setMVehNroPla( String value )
   {
      MVehNroPla = value;
   }

   public String getMVehNomPro( )
   {
      return MVehNomPro ;
   }

   public void setMVehNomPro( String value )
   {
      MVehNomPro = value;
   }

   public int getCmbCod( )
   {
      return CmbCod ;
   }

   public void setCmbCod( int value )
   {
      CmbCod = value;
   }

   public byte getTipAutCod( )
   {
      return TipAutCod ;
   }

   public void setTipAutCod( byte value )
   {
      TipAutCod = value;
   }

   public String getModCod( )
   {
      return ModCod ;
   }

   public void setModCod( String value )
   {
      ModCod = value;
   }

   public String getMarCod( )
   {
      return MarCod ;
   }

   public void setMarCod( String value )
   {
      MarCod = value;
   }

   public void clear( )
   {
      VSel = 0 ;
      MVehCod = 0 ;
      MVehNroPla = "" ;
      MVehNomPro = "" ;
      CmbCod = 0 ;
      TipAutCod = 0 ;
      ModCod = "" ;
      MarCod = "" ;
   }

   public int compareTo( GXSubfileElement element ,
                         int column )
   {
      switch (column)
      {
            case 0 :
               if ( VSel > ((subwmntvehser06) element).getVSel() ) return 1;
               if ( VSel < ((subwmntvehser06) element).getVSel() ) return -1;
               return 0;
            case 1 :
               if ( MVehCod > ((subwmntvehser06) element).getMVehCod() ) return 1;
               if ( MVehCod < ((subwmntvehser06) element).getMVehCod() ) return -1;
               return 0;
            case 2 :
               return GXutil.strcmp( GXutil.upper( MVehNroPla ), GXutil.upper( ((subwmntvehser06) element).getMVehNroPla() ));
            case 3 :
               return GXutil.strcmp( GXutil.upper( MVehNomPro ), GXutil.upper( ((subwmntvehser06) element).getMVehNomPro() ));
            case 4 :
               if ( CmbCod > ((subwmntvehser06) element).getCmbCod() ) return 1;
               if ( CmbCod < ((subwmntvehser06) element).getCmbCod() ) return -1;
               return 0;
            case 5 :
               if ( TipAutCod > ((subwmntvehser06) element).getTipAutCod() ) return 1;
               if ( TipAutCod < ((subwmntvehser06) element).getTipAutCod() ) return -1;
               return 0;
            case 6 :
               return GXutil.strcmp( GXutil.upper( ModCod ), GXutil.upper( ((subwmntvehser06) element).getModCod() ));
            case 7 :
               return GXutil.strcmp( GXutil.upper( MarCod ), GXutil.upper( ((subwmntvehser06) element).getMarCod() ));
      }
      return 0;
   }

   public boolean isEmpty( )
   {
      return ( ( VSel == 0 ) && ( MVehCod == 0 ) && ( GXutil.strcmp(MVehNroPla, "") == 0 ) && ( GXutil.strcmp(MVehNomPro, "") == 0 ) && ( CmbCod == 0 ) && ( TipAutCod == 0 ) && ( GXutil.strcmp(ModCod, "") == 0 ) && ( GXutil.strcmp(MarCod, "") == 0 ) )  ;
   }

   public void setColumn( GXComponent cell ,
                          int field )
   {
      switch (field) {
         case 0 :
            cell.setValue( VSel );
            break;
         case 1 :
            cell.setValue( MVehCod );
            break;
         case 2 :
            cell.setValue( MVehNroPla );
            break;
         case 3 :
            cell.setValue( MVehNomPro );
            break;
         case 4 :
            cell.setValue( CmbCod );
            break;
         case 5 :
            cell.setValue( TipAutCod );
            break;
         case 6 :
            cell.setValue( ModCod );
            break;
         case 7 :
            cell.setValue( MarCod );
            break;
      }
   }

   public boolean isFieldChanged( GXComponent cell ,
                                  int field )
   {
      switch (field) {
         case 0 :
            return ( (((GUIObjectByte) cell).getValue() == VSel) );
         case 1 :
            return ( (((GUIObjectShort) cell).getValue() == MVehCod) );
         case 2 :
            return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),MVehNroPla) == 0) );
         case 3 :
            return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),MVehNomPro) == 0) );
         case 4 :
            return ( (((GUIObjectInt) cell).getValue() == CmbCod) );
         case 5 :
            return ( (((GUIObjectByte) cell).getValue() == TipAutCod) );
         case 6 :
            return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),ModCod) == 0) );
         case 7 :
            return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),MarCod) == 0) );
      }
      return false;
   }

   public void setField( int i ,
                         GXComponent value )
   {
      switch (i)
      {
            case 0 :
               VSel = value.getByteValue() ;
               break;
            case 1 :
               MVehCod = value.getShortValue() ;
               break;
            case 2 :
               MVehNroPla = value.getStringValue() ;
               break;
            case 3 :
               MVehNomPro = value.getStringValue() ;
               break;
            case 4 :
               CmbCod = value.getIntValue() ;
               break;
            case 5 :
               TipAutCod = value.getByteValue() ;
               break;
            case 6 :
               ModCod = value.getStringValue() ;
               break;
            case 7 :
               MarCod = value.getStringValue() ;
               break;
      }
   }

   public void setField( int i ,
                         GXSubfileElement element )
   {
      switch (i)
      {
            case 0 :
               VSel = ((subwmntvehser06) element).VSel;
               return;
            case 1 :
               MVehCod = ((subwmntvehser06) element).MVehCod;
               return;
            case 2 :
               MVehNroPla = ((subwmntvehser06) element).MVehNroPla;
               return;
            case 3 :
               MVehNomPro = ((subwmntvehser06) element).MVehNomPro;
               return;
            case 4 :
               CmbCod = ((subwmntvehser06) element).CmbCod;
               return;
            case 5 :
               TipAutCod = ((subwmntvehser06) element).TipAutCod;
               return;
            case 6 :
               ModCod = ((subwmntvehser06) element).ModCod;
               return;
            case 7 :
               MarCod = ((subwmntvehser06) element).MarCod;
               return;
      }
   }

}

